﻿using System.Windows.Forms;
using GeneratorSelections.DataDictionary;

namespace GeneratorSelections
{
    public  class StartGeneratorSelection
    {
        private readonly string _tableNameLike;
        public StartGeneratorSelection(string tableNameLike)
        {
            _tableNameLike = tableNameLike;
        }
        public Table SelectedTable { get; private set; }

        public void Execute()
        {
            var f = new TableSelectionForm();
            f.Init(_tableNameLike);

            var dr = f.ShowDialog();

            if ( dr == DialogResult.OK)
                SelectedTable = f.SelectedTable;
        }
    }
}
